// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** 新增代码值 新增代码值 POST /codeValueTable/addCodeValue */
export async function addCodeValueUsingPost(
  body: dataFactory.AddCodeValueDTO,
  options?: { [key: string]: any },
) {
  return request<dataFactory.R>('/codeValueTable/addCodeValue', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 删除代码值 通过ID删除代码值 DELETE /codeValueTable/deleteCodeValue/${param0} */
export async function deleteCodeValueUsingDelete(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: dataFactory.deleteCodeValueUsingDELETEParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<dataFactory.R>(`/codeValueTable/deleteCodeValue/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 获取代码值 通过ID获取代码值 GET /codeValueTable/getCodeValue/${param0} */
export async function getCodeValueUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: dataFactory.getCodeValueUsingGETParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<dataFactory.R>(`/codeValueTable/getCodeValue/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 更新代码值 更新代码值信息 PUT /codeValueTable/updateCodeValue */
export async function updateCodeValueUsingPut(
  body: dataFactory.UpdateCodeValueDTO,
  options?: { [key: string]: any },
) {
  return request<dataFactory.R>('/codeValueTable/updateCodeValue', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
